package com.wwe.kotlinstudy.dm.fourteen;

/**
 * @name KotlinStudy
 * @package name：com.wwe.kotlinstudy.dm.fourteen
 * @anthor DavidZhang
 * @time 2018/5/25 10:18
 * @class describe
 */
public class MyHandler extends Abstracthandler implements Handler {

    private String name;

    public MyHandler(String name) {
        this.name = name;
    }

    @Override
    public void operator() {
        System.out.println(name + "chain");
        if (getHandler() != null) {
            getHandler().operator();
        }
    }
}
